//
//  LXHandleDatas.h
//  LXLocationRelated
//
//  Created by Livespro on 2017/10/22.
//  Copyright © 2017年 Livesxu. All rights reserved.
//

#import <Foundation/Foundation.h>

@class CMDeviceMotion;

@class CLLocation;

/**
 数据处理类
 */
@interface LXHandleDatas : NSObject

+ (instancetype)shareHandle;

/**
 写入路程
 */
- (void)handleDistanceIn:(CLLocation *)startLocation;

/**
 行程结束
 */
- (void)handleDistanceEnd:(CLLocation *)endLocation;

/**
 删除行程
 
 @param distanceId 行程id
 */
- (void)handleDistanceDelete:(NSInteger)distanceId;

/**
 行程导出
 */
- (NSString *)handleDistanceOut;

/**
 location写入

 @param latitude 纬度
 @param longitude 经度
 @param altitude 海拔
 @param horizontalAccuracy 水平海拔
 @param verticalAccuracy 垂直海拔
 @param course 航向(0---359.0)
 @param speed 速度
 @param timestamp 时间点
 @param trueHeading 真北
 @param headingAccuracy 如果是负数,代表当前设备朝向不可用
 */
- (void)handleLocationInfoLatitude:(double)latitude
                         longitude:(double)longitude
                          altitude:(double)altitude
                horizontalAccuracy:(double)horizontalAccuracy
                  verticalAccuracy:(double)verticalAccuracy
                            course:(double)course
                             speed:(double)speed
                         timestamp:(NSDate *)timestamp
                       trueHeading:(double)trueHeading
                   headingAccuracy:(double)headingAccuracy;


/**
 location数据读取

 @param timeStart 开始时间
 @param endTime 结束时间
 */
- (NSString *)handleLocationOutStart:(NSDate *)timeStart End:(NSDate *)endTime;

/**
 location数据删除

 @param timeStart 开始时间
 @param endTime 结束时间
 */
- (void)handleLocationDeleteStart:(NSDate *)timeStart End:(NSDate *)endTime;

/**
 motion传感器信息写入

 @param deviceMotion 传感器model
 */
- (void)handleMotionInfoMotion:(CMDeviceMotion *)deviceMotion;

/**
 motion数据读取
 
 @param timeStart 开始时间
 @param endTime 结束时间
 */
- (NSString *)handleMotionOutStart:(NSDate *)timeStart End:(NSDate *)endTime;

/**
 motion数据删除

 @param timeStart 开始时间
 @param endTime 结束时间
 */
- (void)handleMotionDeleteStart:(NSDate *)timeStart End:(NSDate *)endTime;

/**
 日志写入

 @param descMonitor 写入信息
 @param timestamp 写入时间
 @param userId 用户id
 */
- (void)handleMonitorIn:(NSString *)descMonitor
                   Time:(NSDate *)timestamp
                   User:(NSString *)userId;


/**
 日志读取

 @return 读取内容
 */
- (NSString *)handleMonitorOut;

@end
